<?php
/**
* @version		$Id: default.php 11 2010-10-07 15:00:29Z ahmtsari $
* @package		AlphaUserPoints for Joomla
* @copyright	Copyright (C) 2008. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

$document	= & JFactory::getDocument();

if ( $list ) {
?>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<?php if ( $params->get('showheader') ) { ?>
  <tr>
    <?php if ( $params->get('showdate') ) { ?>
	<td class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>" width="20%"><div align="center"><?php echo JText::_('MODAUP_LP_DATE'); ?></div></th>
	<?php } ?>
    <td class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>"><div align="left"><?php echo JText::_('MODAUP_LP_NAME'); ?></div></th>
    <td class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>" width="25%"><div align="left"><?php echo JText::_('MODAUP_LP_POINTS'); ?></div></th>
  </tr>
<?php } ?>
	<?php
	$k = 0;
	foreach ($list as $item) { ?>
		<tr>
		<?php if ( $params->get('showdate') ) { ?>
		<td class="sectiontableentry<?php echo $k; ?>" width="20%"><div align="center"><?php echo $item->insert_date; ?></div></td>
		<?php } ?>
		<td class="sectiontableentry<?php echo $k; ?>"><div align="left"><?php echo htmlspecialchars($item->usrname, ENT_QUOTES, 'UTF-8'); ?></div></td>
		<td class="sectiontableentry<?php echo $k; ?>" width="25%"><div align="left"><?php echo $item->last_points ; ?></div></td>
		</tr>
		<?php
		$k = 1 - $k;
 	 }
?>
</table>
<?php
} 
?>